<template>
	<view class="container">
		<z-paging ref="paging" auto v-model="makeDataList" @query="queryInvestmentProductPageByApp">
			<view class="container_box mt10">
				<view v-for="item in makeDataList" :key="item.productCode" @click="goPage(item)" class="center-item mb15">
					<view class="mb15">
						<u--image :showLoading="true" :src="item.headUrl1.split('&')[0]" shape="square" width="100%"
							height="340rpx"></u--image>
					</view>
					<view class="center-item-title mb10">
						<view>{{item.productName}}</view>
					</view>
					<view class="center-item-desc mb20">
						<view>{{item.productDesc}}</view>
					</view>
				</view>
			</view>
		</z-paging>


		<!-- <view style="width: 100%;height: calc(120rpx + env(safe-area-inset-bottom) / 2);"></view> -->
		<!-- <tab-bar-view :tabCode="'1'"></tab-bar-view> -->
	</view>
</template>

<script>
	import {
		queryInvestmentProductPageByApp
	} from "@/api/index.js"
	export default {
		onLoad() {
			console.log('onLoad');
		},
		onShow() {
			console.log('onShow');
			
		},
		data() {
			return {
				userInfo: uni.getStorageSync('userInfo'),
				makeDataList: [],
			};
		},
		methods: {
			queryInvestmentProductPageByApp(pageNo, pageSize) {
				queryInvestmentProductPageByApp({
					pageIndex: pageNo,
					pageSize: pageSize
				}).then(res => {
					this.$refs.paging.complete(res.object.data);
				})
			},
			
			goPage(data) {
				uni.navigateTo({
					url: "/subpkg/richText/richText?type=investment&productCode=" + data.productCode
				});
			}
		},
	};
</script>

<style lang="scss" scoped>
	page {
		background-color: #f5f5f5;
	}

	.container {
		background-color: #f5f5f5;
		font-family: Source Han Sans CN, Source Han Sans CN-500;
		min-height: 100vh;
		box-sizing: border-box;
	}

	.container_box {
		display: flex;
		flex-direction: column;
		align-items: center;

	}

	.center-item {
		width: 700rpx;
		box-sizing: border-box;
		background: #FFFFFF;
		border: 2rpx solid #ffffff;
		border-radius: 12rpx;
		overflow: hidden;

		.center-item-title {
			padding: 0 20rpx;
			font-size: 28rpx;
			color: #333333;
		}

		.center-item-desc {
			padding: 0 20rpx;
			font-size: 24rpx;
			line-height: 48rpx;
			color: #999999;
		}

	}
</style>